﻿<phone:PhoneApplicationPage 
    x:Class="MostPopular.OptionsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:MostPopular"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    d:DataContext="{d:DesignInstance local:MainViewModel, IsDesignTimeCreatable=True}">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="New York Times Most Popular" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Options" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        	<StackPanel Orientation="Vertical" d:LayoutOverrides="Height">
        		<CheckBox Content="Show All Sharing Sources" HorizontalAlignment="Left" x:Name="AllSources" IsChecked="{Binding IsAllSources, Mode=TwoWay}"/>
        		<StackPanel d:LayoutOverrides="Width" Orientation="Horizontal">
        			<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                        <CheckBox Content="{Binding Shared[0].Name}" x:Name="Digg" IsChecked="{Binding Shared[0].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[1].Name}" x:Name="Email" IsChecked="{Binding Shared[1].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[2].Name}" x:Name="Facebook" IsChecked="{Binding Shared[2].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[3].Name}" x:Name="Mixx" IsChecked="{Binding Shared[3].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[4].Name}" x:Name="Myspace" IsChecked="{Binding Shared[4].IsEnabled, Mode=TwoWay}"/>
        			</StackPanel>
        			<StackPanel d:LayoutOverrides="Height">
                        <CheckBox Content="{Binding Shared[5].Name}" Margin="0,0,-95,0" x:Name="Permalink" d:LayoutOverrides="Width" IsChecked="{Binding Shared[5].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[6].Name}" Margin="0,0,-95,0" x:Name="TimesPeople" d:LayoutOverrides="Width" IsChecked="{Binding Shared[6].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[7].Name}" Margin="0,0,-95,0" x:Name="Twitter" d:LayoutOverrides="Width" IsChecked="{Binding Shared[7].IsEnabled, Mode=TwoWay}"/>
                        <CheckBox Content="{Binding Shared[8].Name}" Margin="0,0,-95,0" 
                                  x:Name="Yahoo" d:LayoutOverrides="Width" IsChecked="{Binding Shared[8].IsEnabled, Mode=TwoWay}"/>
        			</StackPanel>
        		</StackPanel>
        		<TextBlock Margin="0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="Maximum Results"/>
        		<Grid>
        			<Grid.ColumnDefinitions>
        				<ColumnDefinition Width="Auto"/>
        				<ColumnDefinition/>
        			</Grid.ColumnDefinitions>
                    <TextBlock HorizontalAlignment="Left" Margin="0,13,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" Text="{Binding MaxResults}" VerticalAlignment="Top"/>
        			<Slider Value="{Binding MaxResults, Mode=TwoWay}" d:LayoutOverrides="Height" Grid.Column="1" Minimum="20" Maximum="100" LargeChange="10" SmallChange="1" VerticalAlignment="Center"/>
        		</Grid>
        		<Image Source="/Images/poweredby_nytimes_200c.png" Width="200"/>
        	</StackPanel>
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
